﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="FL.Web.BackEnd.DataGrid" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <script src="../../SFramework/boot.js"></script>
    <style type="text/css">
        body {
            padding-left: 0px;
            font-size: 13px;
        }

        h1 {
            font-size: 20px;
            font-family: Verdana;
        }

        h4 {
            font-size: 16px;
            margin-top: 25px;
            margin-bottom: 10px;
        }

        .description {
            padding-bottom: 30px;
            font-family: Verdana;
        }

        .description h3 {
            color: #CC0000;
            font-size: 16px;
            margin: 0 30px 10px 0px;
            padding: 45px 0 8px;
            /*background:url(titleback.png) no-repeat scroll left bottom transparent*/
            border-bottom: solid 1px #888;
        }

        body {
            margin: 0;
            padding: 0;
            border: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }
        html, body {
            margin: 0;
            padding: 0;
            border: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
        }

        .col1 {
            float: left;
            width: 25%;
        }

        .col2 {
            float: left;
            width: 50%;
        }

        .query_table {
            width: 100%;
        }

        .label {
            width: 90px;
            text-align: right;
        }

        .exp {
            width: 60px;
        }

        .exp > select {
                width: 60px;
            }
    </style>

    <!--引入皮肤样式-->
    <%--    <link href="../../SFramework/miniui/themes/blue/skin.css" rel="stylesheet" />--%>
     
<link href="../../../Styles/form.common.css" rel="stylesheet" />
</head>
  <body style="margin: 0px; padding: 0px">
    <div style="width: 100%; height: 100%">
        <div class="mini-toolbar" style="border-bottom: 0; padding: 0px;">
            <table style="width: 100%;">
                <tr>
                    <td style="width: 100%;">
                        <%=BtnItems %>
                    </td>
                    <td style="white-space: nowrap;"><%=ToolbarHtml %></td>
                    <td style="white-space: nowrap;"><a class="mini-button" iconcls="icon-expand" plain="true" onclick="showQuery()" id="btnHQuery">查询</a></td>
                    <td style="white-space: nowrap;">
                        <input type="checkbox" id="checkAndOr" /><span style="margin-top: -5px;">并集</span>
                        <input id="QueryContext" type="text" onkeypress="fnOnQuciklyQuery" />
                        <a class="mini-button" onclick="fnQuciklyQuery()">查询</a>
                    </td>
                </tr>
            </table>
            <div id="QueryItem" style="display: none;">
                <table style="width: 100%;">
                    <tr>
                        <td style="width: 100%;">
                            <div><%=QueryHtml %></div>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <div style="width: 99.9999%; text-align: center; border-top: #808080 1px solid; padding-top: 5px; padding-bottom: 5px; margin: 0px;">
                                <a class="mini-button" iconcls="icon_close" onclick="fnEmptyQuery()">清空</a><a class="mini-button" iconcls="icon_close" onclick="fnCloseQuery()" onkeypress="">关闭</a><a class="mini-button" iconcls="icon_find" onclick="fnHightLevelQuery()">查询</a>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>

        <div class="mini-fit">
            <div id="datagrid1" class="mini-datagrid" allowresize="true" allowscroll="true" allowcelledit="<%=AllowEdit.ToString().ToLower()%>" allowcellselect="<%=AllowEdit.ToString().ToLower()%>" multiselect="true"
                editnextonenterkey="true" onselectionchanged="onSelectionChanged" 
        selectOnLoad="true" editnextrowcell="true" idfield="id" multiselect="<%=GetStringFromQueryString("selectMode","true")%>" url="../data/jsondata.aspx?functionid=<%=this.FunctionID%>&entity=<%=EntityName%>&condition=<%=Condition %>&order=<%=Order%>&desc=<%=GetStringFromQueryString("desc","Yes") %>&datagrid=true&totalfields=<%=GetStringFromQueryString("totalfields","")%>" pagesize="25" showsummaryrow="<%=GetStringFromQueryString("totalfields","")==""?"false":"true" %>" ondrawsummarycell="onDrawSummaryCell">
                <div property="columns"  >
                    <div type="indexcolumn" width="25"></div>
                    <div type="checkcolumn" width="25"></div>
                    <%=DataFields %>
                    <%--<div field="group_id" width="120" type="comboboxcolumn" headeralign="center" allowsort="true">类型
                    <input property="editor" class="mini-combobox" style="width:100%;" data="FeeType" />
                </div>--%>
                </div>

            </div>
            <div id="mainTabs" class="mini-tabs" activeindex="0" style="width: 100%; height: 200px;"
            plain="false">
            <%=List_Page_Extend_Html %>
        </div>
        </div>
 </div>

<script type="text/javascript">
    const_entityID = "<% =EntityId %>",    //实体ID名称
    const_entityName = "<% =EntityName %>",//实体名称
    const_EditEntity = "<% =EditEntity %>",//编辑实体名
    const_ViewEntity = "<% =this.GetStringFromQueryString("View_Entity","")%>",
    const_functionId   ="<% =FunctionID %>",//自定义条件
    const_Order ="<% =Order %>",           //排序  
    const_UserId = "<% = UserId %>",       // 

    const_QueryField="<% =QuciklyQueryFields %>",
    const_CustomCondition = encodeURI("<% =DefineCondition %>"),//查询方案条件
    const_Condition = encodeURI("<% =Condition %>"),//
    const_PageTitle=encodeURI("<% =PageTitle %>"),
    _openWindowHeight=<%=EditWindowHeight%>,
    _openWindowWidth=<%=EditWindowWidth%>;
    var mergeCols = "<%=GetStringFromQueryString("mergeCols","")%>";
    <% =ColumnDataSource%>
</script>
    <script>
        <% =List_self_script %>
    </script>
    <script type="text/javascript">
        $("#datagrid1").width($(document).width());
        $("#datagrid1").height($(document).height() - 37-255);
      
        mini.parse();
        var grid= mini.get("datagrid1")
    

        grid.load();
        function onSelectionChanged(e) {
            if(typeof(customSelectionChanged)=="function")
            {
                customSelectionChanged(e);
                return ;
            }
            var grid = e.sender;
            var record = grid.getSelected();
        }
       

    </script>
<script src="../../Scripts/datagrid/list.common.button.js"></script>
<script src="../../Scripts/common/jquery.action.js"></script>
<script src="../../Scripts/common/jquery.data.js"></script>
<script src="/SFramework/jquery.json-2.2.js"></script>
<script src="../../scripts/app/list/<%=EntityName %>.list.js?v=0.1"></script>
</body>
</html>
